<style>
    .footer-home{display: none;}
</style>
<header>
    <a href="javascript:history.back();">
        <i class="iconfont icon-xialalan-copy"></i>
    </a>
    <span><?php echo $output['merchant_info']['mc_shop_name']; ?></span>
</header>
<div class="contect margin_bot">
    <div class="en_pic">
        <img src="<?php echo $output['merchant_info']['mc_cover_img']; ?>" alt="酒店环境图片"/>
    </div>
    <ul class="ul_mar">
        <li class="ul_info">
            <i class="icon_1 iconfont icon-diliweizhi"></i><?php echo $output['merchant_info']['address']; ?>
            <a  onclick="checkMap('<?php echo $output['merchant_info']['address']; ?>','<?php echo HOST_URL; ?>')" class="fr font_s">
                <span class="connect">地图</span>
                <span class="rotate iconfont icon-xialalan-copy font_s"></span>
            </a>
        </li>
        <li class="ul_info">
            <i class="icon_1 iconfont icon-dianhua"></i><?php echo $output['merchant_info']['mc_phone']; ?>
            <a href="tel:<?php echo $output['merchant_info']['service_phone']; ?>" class="fr font_s">
                <span class="connect">联系</span>
                <span class="rotate iconfont icon-xialalan-copy font_s"></span>
            </a>
        </li>
    </ul>
    <div class="room_list">
        <div class="de_title div_padding de_title_bottom">
            商家简介
        </div>
        <div class="ui-tab">
            <P id="info-manager-content" class="info-shrink-text">
               <?php echo $output['merchant_info']['mc_content']; ?>
            </P>
        </div>
    </div>
    <div class="room_list ">
        <div class="de_title div_padding de_title_bottom">
            餐厅代金券
        </div>
        <?php if($output['ticket_list']):?>
        <ul class="room_ul">
            <?php foreach($output['ticket_list'] as $key=>$value): ?>
            <li>
                <a href="index.php?act=food&op=info&fid=<?php echo $value['fd_id']; ?>">
                    <div class="room_pic">
                        <img src="<?php echo $value['fd_thumb']; ?>" alt="房间"/>
                    </div>
                    <span class="room_title p-1"><?php echo $value['fd_title']; ?></span>
                    <span class="area"><?php echo $value['label']; ?></span>
                    <span class="dis">优惠已减<i class="iconfont icon-renminbi"><?php echo $value['fd_market_price']-$value['price']; ?></i></span>
                    <span class="money connect "><i class="iconfont icon-renminbi"><?php echo $value['price']; ?></i></span>
                    <span class="price_1"><i class=" iconfont icon-renminbi"><?php echo $value['fd_market_price']; ?></i></span>
                    <?php if($value['stock']>0){ ?>
                    <a class="booking" href="index.php?act=food&op=place_info&fd_id=<?php echo $value['fd_id']; ?>">预定</a>
                    <?php }else{ ?>
                        <a class="noboking">预定</a>
                    <?php } ?>
                </a>
            </li>
                <?php endforeach; ?>
        </ul>
        <?php endif; ?>
    </div>
    <div class="slid">收起</div>
    <div class="room_list ">
        <div class="de_title div_padding de_title_bottom">
            餐厅套餐
        </div>
        <?php if($output['food_list']):?>
            <ul class="room_ul">
                <?php foreach($output['food_list'] as $key=>$value): ?>
                    <li>
                        <a href="index.php?act=food&op=info&fid=<?php echo $value['fd_id']; ?>">
                            <div class="room_pic">
                                <img src="<?php echo $value['fd_thumb']; ?>" alt="房间"/>
                            </div>
                            <span class="room_title p-1"><?php echo $value['fd_title']; ?></span>
                            <span class="area"><?php echo $value['label']; ?></span>
                            <span class="dis">优惠已减<i class="iconfont icon-renminbi"><?php echo $value['fd_market_price']-$value['price']; ?></i></span>
                            <span class="money connect "><i class="iconfont icon-renminbi"><?php echo $value['price']; ?></i></span>
                            <span class="price_1"><i class=" iconfont icon-renminbi"><?php echo $value['fd_market_price']; ?></i></span>
                            <?php if($value['stock']>0){ ?>
                                <?php if($value['open_spec']){ ?>
                                    <a class="booking" href="index.php?act=food&op=info&fid=<?php echo $value['fd_id']; ?>">预定</a>
                                <?php }else{ ?>
                                    <a class="booking" href="index.php?act=food&op=place_info&fd_id=<?php echo $value['fd_id']; ?>">预定</a>
                                <?php } ?>
                            <?php }else{ ?>
                                <a class="noboking">预定</a>
                            <?php } ?>
                        </a>
                    </li>
                <?php endforeach; ?>
            </ul>
        <?php endif; ?>
    </div>
    <div class="slid">收起</div>
</div>
<script>
    $(function () {
        $(".room_ul").each(function(item){
            if($(".room_ul").eq(item).find("li").length > 2){
                $(".room_ul").eq(item).slideUp();
                $(this).parent().next().text("展开");
            }
            else{
                $(".room_ul").eq(item).slideDown();
                $(this).parent().next().text("收起");
            }
        });

    });

    $(".slid").click(function () {
        /*var _text = $(this).text();*/
        $(this).prev().find(".room_ul").slideToggle("nomal",function () {
        });
        $(this).text()=="展开" ? $(this).text("收起") : $(this).text("展开");
    });


</script>